import request from '@/utils/axiosUtils.js'


export const hospitalInfoService = () => {  
    return request({
        url: '/hospital',
        method: 'get',
    })
}

export const mealInfoService = (data) => {
    //console.log(data)
    return request({
        url: '/setmeal',
        method: 'get',
        params:{
            sex:data
        }
    })
}


export const getOneHpService = (id) => {
    return request({
        url: `/hospital/${id}`,
        method: 'get'
    })
}

export const getOneMlService = (id) => {
    return request({
        url: '/setmeal/id',
        method: 'get',
        params:{
            id:id
        }
    })
}

export const createOrderService = (data) => {
    //console.log(data)
    return request({
        url: '/orders',
        method: 'post',
        data:{
            date:data.date,
            hpId:data.hpId,
            smId:data.smId
        }
    })
}



export const cancelOrdersService = (data) => {
   
    return request({
        url: '/orders',
        method: 'delete',
        params:{
            id:data.orderid
        }})
    }
    
       

export const reportlistService = () => {  
    return request({
        url: '/orders',
        method: 'get',
    })
}

export const reportService = (id) => {  
    //console.log(id)
    return request({
        url: '/report',
        method: 'get',
        params:{
            orderid:id
        }
    })
}